package vn.edu.uit.chemistry.model;

import vn.edu.uit.chemistry.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ProgressBar;
import android.widget.TextView;

public class KiemTraAdapter extends BaseAdapter {

	Context ctx;
	LayoutInflater mInflater;
	String[] hotens = { "Hoc Sinh A", "Hoc Sinh B" };
	String[] mshs = { "hs12345", "hs12346" };
	int[] percent = { 85, 65 };

	public KiemTraAdapter(Context _ctx) {
		this.ctx = _ctx;
		mInflater = LayoutInflater.from(_ctx);
	}

	public int getCount() {
		// TODO Auto-generated method stub
		return hotens.length;
	}

	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	public class KTHolder {
		TextView tvHoten;
		TextView tvMSHS;
		ProgressBar prPhanTram;
		TextView tvPhanTram;
		TextView tvHoanTat;
	}

	public View getView(int pos, View v, ViewGroup parent) {
//		KTHolder holder;
//		if (v == null) {
//			v = mInflater.inflate(R.layout.row_kiem_tra, null);
//			holder = new KTHolder();
//			holder.tvHoten = (TextView) v.findViewById(R.id.tvHoTen);
//			holder.tvMSHS = (TextView) v.findViewById(R.id.tvMSHS);
//			holder.prPhanTram = (ProgressBar) v.findViewById(R.id.prPhanTram);
//			holder.tvPhanTram = (TextView) v.findViewById(R.id.tvPercent);
//			holder.tvHoanTat = (TextView) v.findViewById(R.id.tvFinish);
//			v.setTag(holder);
//
//		} else {
//			holder = (KTHolder) v.getTag();
//		}
//
//		holder.tvHoten.setText("Họ tên: " + hotens[pos]);
//		holder.tvMSHS.setText("MSHS: " + mshs[pos]);
//		
//		holder.tvHoanTat.setVisibility(View.GONE);
		return v;
	}

}
